import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Main from '../views/Main.vue'
import Home from '../views/Home.vue'
import Community from '../views/Community.vue'
import Store from '../views/Store.vue'
import courierStation from '../views/courierStation.vue'
import Goods from '../views/Goods.vue'
Vue.use(VueRouter)

const routes = [
	{path:'/',redirect:'/login'},
	{path:'/login',component:Login},
	{path:'/main',component:Main,
	children:[
		{path:'/home',component:Home},
		{path:'/community',component:Community},
		{path:'/store',component:Store},
		{path:'/courierstation',component:courierStation},
		{path:'/goods',component:Goods},
	]},
	
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
